<?php
global $_RQ,$_AR;
$_RQ['op']=$_RQ['op']?$_RQ['op']:'list';
if($_RQ['op']=='list'){
	$pindex = max(1, intval($_RQ['page']));
	$psize = 15;
	$params=array('uniacid'=>$_SESSION['uniacid'],'mid'=>$_SESSION['uid']);
    $orderby='createtime desc';
	$total='';
	$return['list']=pdo_getslice('jy_weishop_live_dy',$params,array($pindex,$psize),$total,$fields,'',$orderby);
	foreach($return['list'] as &$v){
		$r=pdo_get('jy_weishop_live_room',array('id'=>$v['roomid']));
		if(strtotime($r['createtime']) < TIMESTAMP){
			$v['living']=1;
		}else{
			$v['living']=0;
		}
		$v['image']=$r['image'];
		$v['title']=$r['title'];
		$v['livetime']=$r['livetime'];
		$v['likes']=pdo_count('jy_weishop_live_dy',array('roomid'=>$v['roomid']));
	}
	exi($return);
}

?>